package com.example.mapper;

import com.example.entity.Lecture;
import com.example.entity.bo.CourseStudentResultBO;
import com.example.entity.example.LectureExample;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface LectureMapper {
    long countByExample2(LectureExample example);

    int deleteByExample(LectureExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Lecture record);

    int insertSelective(Lecture record);

    List<Lecture> selectByExample(LectureExample example);

    Lecture selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Lecture record, @Param("example") LectureExample example);

    int updateByExample(@Param("record") Lecture record, @Param("example") LectureExample example);

    int updateByPrimaryKeySelective(Lecture record);

    int updateByPrimaryKey(Lecture record);

    List<Lecture> selectByExampleWithLimit(@Param("teacherName") String teacherName, @Param("courseName") String courseName, @Param("beginDate") Date beginDate, @Param("endDate") Date endDate, @Param("begin") Integer begin, @Param("limit") Integer limit);

    long countByExample2(@Param("teacherName") String teacherName, @Param("courseName") String courseName, @Param("beginDate") Date beginDate, @Param("endDate") Date endDate);

    List<Lecture> selectOrderByDateWithLimit(@Param("date") Date date, @Param("n") Integer n);

    List<CourseStudentResultBO> selectCourseStudentResultsByExampleWithLimit(@Param("teacherId") String teacherId,
                                                                             @Param("courseId") String courseId,
                                                                             @Param("studentId") String studentId,
                                                                             @Param("begin") Integer begin,
                                                                             @Param("limit") Integer limit);
}